﻿using NewLife.Data;
using System.IO;
using WalkingTec.Mvvm.Core;

namespace ReceiptPrint
{
    public class Global
    {
        public static bool UsePdf { get; private set; } = false;
        public static bool UseNanui { get; set; } = true;
        public static long StartNumber = 2101402220;

        public const string Header = @"F & S Supermarkt Hob.
Cerme Food B.V.
Hoboemastraat 173
2526 JJ Den Haag
BTW nr:NLB 13279021";

        public const string SubHeader = @"KASSABON Nr {0}    Kassa  2
{1}   {2}        E. Narin";

        public const string Footer = @"TOT ZIENS      Tel: 070-3887800
Ma t/m Za 08:00-20:00Zo10:00-18:00
Zuivel,Dieovries, Actie artikelen
ruilen wij niet!";


        public const decimal Rate = 7.65m;

        public const int Step = 65;

        public static Snowflake Snowflake { get; private set; } = new Snowflake();

        public static long GetId() => Snowflake.NewId();

        public static string GetFullPath(WTMContext wtm,string path)
        {
            string rv = "";
            if (path.StartsWith("."))
            {
                rv = Path.Combine(wtm.ConfigInfo.HostRoot, path);
            }
            else
            {
                rv = path;
            }
            rv = Path.GetFullPath(rv);
            return rv;
        }

    }
}
